<link rel='stylesheet' href='${rc.getContextPath()}/manage/styles/colorPicker/spectrum.css' />
<style>
dl.defectLookup span.error {
	position: absolute !important;
	left: 257px;
}

.sp-dd {
	background:
		url("${rc.getContextPath()}/manage/styles/dwz/themes/default/images/button/imgX.png");
	background-position: -163px -1px;
	height: 18px;
	width: 16px;
	position: absolute;
	right: 0px;
	top: 0px;
	border: 1px solid #D9DFE5;
}

.sp-replacer {
	padding: 0px;
	border: 0px !important;
	background: #EDF4F5 none repeat scroll 0% 0%;
	width: 146px;
	height: 24px;
	position: relative;
}

.sp-replacer.sp-active {
	border-color: #289BE5;
}

.sp-container, .sp-palette-container {
	border-color: #BDD7E7;
}

.sp-input {
	border: 1px solid #D9DFE5;
}

.sp-preview {
	width: 127px;
	height: 22px;
	border: 1px solid #D9DFE5;
	margin: 0px;
}
</style>
<div class="pageContent">
	<form method="post" action="${rc.getContextPath()}/manage/andonType/saveAndonType" class="pageForm required-validate" onsubmit="return validateCallback(this,dialogAjaxDone);">
		<div class="pageFormContent">
			<fieldset>
				<dl>
					<dt style="width: 120px;"><@label key="andonTypeCode.C,colon">安灯类型编号</@label></dt>
					<dd>
						<input name="andonTypeCode" size="22" type="text" maxlength="20" class="required  alphanumeric toUp" warn="<@label key='defectCode.C,alreadyExists'>缺陷编号已存在</@label>" value="${andonType.andonTypeCode!''}" readonly="readonly"
					</dd>
				</dl>
				<dl>
					<dt style="width: 120px;"><@label key="andonTypeText.C,colon">安灯类型描述</@label></dt>
					<dd>
						<input name="typeText" size="22" type="text" maxlength="60" class="required" value="${andonType.typeText!''}" readonly="readonly" />
					</dd>
				</dl>
				<dl class="defectLookup">
					<dt style="width: 120px;"><@label key="status.C,colon">状态</@label></dt>
					<dd>
						<input name="lockFlag" size="22" type="text" maxlength="60" class="required" readonly="readonly"<#if andonType.lockFlag == 0> value="<@label key="enable.C">启用</@label>" <#else> value="<@label key="disable.C">禁用</@label>" </#if>
					</dd>
				</dl>
				<dl>

				</dl>
				<dl style="height: 40px;">
					<dt style="width: 120px;"><@label key="normalColor.C,colon">正常状态颜色</@label></dt>
					<dd>
						<input type='text' id="normalColor" name="normalColor" readonly="readonly" value="${andonType.normalColor!'#FF0000'}" />
					</dd>
				</dl>
				<dl style="height: 40px;">
					<dt style="width: 120px;"><@label key="touchColor.C,colon">触发状态颜色</@label></dt>
					<dd>
						<input type='text' id="touchColor" name="touchColor" readonly="readonly" value="${andonType.touchColor!'#FF0000'}" />
					</dd>
				</dl>
			</fieldset>
		</div>
		<div class="panel">
			<h1><@label key="customAttribute.C">自定义属性</@label></h1>
			<div class="panelContent">
				<table id="andonAttributeTable" class="table border canopration" width="100%"layoutH="330">
					<thead>
                                            <tr>                                        
							                <th width="100"><@label key="andonAttributeCode.C">ANDON属性编号</@label></th>
							                <th width="100"><@label key="andonAttributeText.C">ANDON属性描述</@label></th>
							                <th width="100"><@label key="type.C">类型</@label></th>
                                            </tr>
                                        </thead>
                                        <tbody id="andonAttributeBody">
                                            <#if andonType.andonAttributes??> <#if (andonType.andonAttributes?size>0)><#list andonType.andonAttributes as andonAttribute>
                                            <tr id="andonAttribute_${andonAttribute.attributeCode!''}" target="andonAttribute_attributeCode" rel="${andonAttribute.attributeCode!''}">
								                <td>${andonAttribute.attributeCode!''}</td>
								                <td>${andonAttribute.attributeText!''}</td>
								                <td>
								                    <#list ECode as eCode>
								                            <#if eCode.eCode==andonAttribute.valueTypeEcode>
								                            ${eCode.eCodeText!''}
								                            </#if>
								                    </#list>
								                </td>
                                            </tr>
                                            </#list><#else>
                                                <#if "read"==pattern>
                                                <tr>
                                                    <td colspan="3" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
                                                </tr>
                                                </#if>
                                            </#if></#if>
                                        </tbody>
                                    </table>
			</div>
		</div>
</div>
<#assign createInfo=andonType>
<#include "/common/createInfo.html">
<div class="formBar">
	<ul>
		<li>
			<div class="buttonActive">
				<div class="buttonContent">
					<button type="button" class="close" onclick="beforeClose();"><@label key="close.B">关闭</@label></button>
				</div>
			</div>
		</li>
	</ul>
</div>
</form>
</div>
<script>
$(function(){
    var dialog= $.pdialog.getCurrent();
    var normalColor=$("#normalColor", dialog);
    var touchColor=$("#touchColor", dialog);
    $("#normalColor",dialog).css("background",normalColor.val()); 
    $("#touchColor",dialog).css("background",touchColor.val());
    normalColor.val("");
    touchColor.val("");
});
</script>
